<?php
    ini_set('max_execution_time', 300);
	ini_set('allow_url_fopen', 1);
    require_once("process2.php");
    $obj_process = new process();
	$i = 0;
	for ($i = 0; $i < 5; $i++){
		$arr_link[][] = $i;
	}
	echo "<pre>";
	print_r($arr_link);
	echo "</pre>";
	die();
	
	//read file json
	$json = json_decode(file_get_contents('results.json', true), true);
	var_dump($json); die();
	
	$url = "http://www.123mua.vn/u204/vay-dam.html";
	$content = $obj_process->get_content($url);
	$content = $obj_process->get_mid($content, '<div class="pf-list">', 'prev', 0, 0);
	$arr_link = $obj_process->get_mid_to_array($content, '<a href="/', 'box=rp', 0, 1);
	$arr_link = array_unique($arr_link);
	$fp = fopen('results.json', 'w');
	fwrite($fp, json_encode($arr_link));
	fclose($fp);
	